<template>
	<el-date-picker v-model="rangeTime" type="datetimerange" value-format="timestamp"
		:picker-options="pickerOptions" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"
		align="right">
	</el-date-picker>
</template>

<script>
	import pickerOptions from '@/utils/pickerOptions.js'
	export default{
		props:["value"],
		data(){
			return {
				rangeTime:[],
				pickerOptions
			}
		},
		watch:{
			rangeTime(){
				this.value.startTime=this.rangeTime[0]
				this.value.endTime=this.rangeTime[1]
			}
		},
		methods:{
			reset(){
				this.rangeTime=[]
			}
		}
	}
</script>

<style>
</style>
